function sort(){
    var arr = [8,2,32,4,1,9];
    for(var i = 0;i<arr.length;i++){
        for(var j = i+1;j<arr.length;j++){
            if(arr[i]>arr[j]){
                var a = arr[i];
                var b = arr[j];
                arr[i]=b;
                arr[j]=a;
            }
        }
    }
    console.log(arr);
}
sort();
